import Cookies from 'js-cookie'

const TokenKey = 'token'
const TIME = 'time'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  Cookies.set(TIME, +new Date())
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
// //存时间
// export function setTime() {
//   return Cookies.set(TIME,+new Date())
// }
//取时间
export function getTime() {
  return Cookies.get(TIME)
}
